import { showToast } from "../../utils/asyncWx.js"
// pages/login/login.js
Page({
  data: {

  },
  onLoad: function (options) {

  },
  async handleGetUserInfo(e) {
    const { userInfo } = e.detail
    if (userInfo) {
      wx.setStorageSync("userinfo", userInfo);
      wx.navigateBack({
        delta: 1
      });
      return;
    }


    await showToast({ title: "登陆失败" })
    setTimeout(() => {
      wx.navigateBack({
        delta: 1
      });
    }, 1500);

  }

})